﻿using Microsoft.CodeAnalysis.CSharp.Syntax;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UMLSynthesizer.CSharpAnalyzer.Elements;
using UMLSynthesizer.LangAnalyzer.Elements;
using UMLSynthesizer.LangAnalyzer.Expressions;
using UMLSynthesizer.LangAnalyzer.Statements;

namespace UMLSynthesizer.CSharpAnalyzer.Expressions
{
    class CSharpElementReferenceExpression : CSharpExpressionBase, IElementReferenceExpression
    {
        #region Constructor

        public CSharpElementReferenceExpression(IdentifierNameSyntax expressionNode,
            IExpressionBase parentExpression,
            IStatementBase parentStatement)
            : base(expressionNode, parentExpression, parentStatement, ExpressionKinds.ElementReference) { }

        #endregion

        #region Properties

        public IElementBase ReferredElement { get { return (ProjectOwner as CSharpProjectElement).GetElementReference(expressionNode); } }

        #endregion
    }
}
